From: Michael Ziegler Date: Thu, 4 Oct 2018 07:10:07 +0000 (+0200) Subject: add debhelper configs (WIP) X-Git-Tag: archive/raspbian/2.0.44-1+rpi1~1^2~3^2~8^2~33^2^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=97c668e01cee825ee85a7ca0064c35c62783beeb;p=siridb-server.git add debhelper configs (WIP) --- diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..0c9f595f --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +siridb-server for Debian +----------------------- + + + + -- unknown Thu, 04 Oct 2018 08:38:54 +0200 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 00000000..4367beb3 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,10 @@ +siridb-server for Debian +----------------------- + + + + + + -- unknown Thu, 04 Oct 2018 08:38:54 +0200 + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..1170f505 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +siridb-server (2.0.29-5) unstable; urgency=medium + + * Initial release + + -- Michael Ziegler Thu, 04 Oct 2018 08:38:54 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..b4de3947 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..619cade4 --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: siridb-server +Section: database +Priority: optional +Maintainer: Jeroen van der Heijden +Build-Depends: debhelper (>= 11), + dh-exec (>=0.3), + dh-autoreconf, + pkg-config, + libpcre2-dev, + libuv1-dev, + uuid-dev, + libcleri-dev +Standards-Version: 4.1.3 +Homepage: http://siridb.net +Vcs-Browser: https://github.com/SiriDB/siridb-server +Vcs-Git: https://github.com/SiriDB/siridb-server.git + +Package: siridb-server +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libuv1 (>= 1.8.0), libcleri0 +Description: SiriDB time series database server + SiriDB is a fast and scalable time series database. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..f195bb65 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,38 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: siridb-server +Source: + +Files: * +Copyright: + +License: + + + . + + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2018 unknown +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid picking licenses with terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..5790b537 --- /dev/null +++ b/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + +override_dh_auto_clean: + cd Release && make clean + +override_dh_auto_build: + cd Release && make diff --git a/debian/siridb-server-docs.docs b/debian/siridb-server-docs.docs new file mode 100644 index 00000000..73190411 --- /dev/null +++ b/debian/siridb-server-docs.docs @@ -0,0 +1,2 @@ +README.source +README.Debian diff --git a/debian/siridb-server.dirs b/debian/siridb-server.dirs new file mode 100644 index 00000000..79cf66d2 --- /dev/null +++ b/debian/siridb-server.dirs @@ -0,0 +1,2 @@ +/etc/siridb +/var/lib/siridb diff --git a/debian/siridb-server.install b/debian/siridb-server.install new file mode 100644 index 00000000..9689fa30 --- /dev/null +++ b/debian/siridb-server.install @@ -0,0 +1,3 @@ +Release/siridb-server /usr/bin +siridb.conf /etc/siridb +help /usr/share/doc/siridb-server diff --git a/debian/siridb-server.postinst b/debian/siridb-server.postinst new file mode 100644 index 00000000..5db62fc1 --- /dev/null +++ b/debian/siridb-server.postinst @@ -0,0 +1,50 @@ +#!/bin/bash + +set -e + +case "$1" in + + configure) + # Set up SiriDB Server + if which deb-systemd-invoke >/dev/null 2>&1 && pidof systemd >/dev/null 2>&1; then + OUTPUT=`deb-systemd-invoke status siridb-server || true` + if [[ $OUTPUT == *"running"* ]]; then + echo "--------------------------------------------------------------------------------" + echo "| type 'sudo systemctl restart siridb-server.service' to restart SiriDB |" + echo "| ...or just reboot the machine. |" + echo "--------------------------------------------------------------------------------" + else + echo "Configure systemd service 'siridb-server' ..." + cp /usr/lib/siridb/server/systemd/siridb-server.service /lib/systemd/system/siridb-server.service + systemctl daemon-reload || true + deb-systemd-invoke enable siridb-server 2>/dev/null >/dev/null || true + echo "--------------------------------------------------------------------------------" + echo "| type 'sudo systemctl start siridb-server.service' to start SiriDB |" + echo "| ...or just reboot the machine. |" + echo "--------------------------------------------------------------------------------" + fi + else + echo "--------------------------------------------------------------------------------" + echo "| Please use supervisor or another deamon to start SiriDB Server |" + echo "| It's also possible to start SiriDB manually using 'sudo siridb-server' |" + echo "--------------------------------------------------------------------------------" + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 \ No newline at end of file diff --git a/debian/siridb-server.prerm b/debian/siridb-server.prerm new file mode 100644 index 00000000..974650d7 --- /dev/null +++ b/debian/siridb-server.prerm @@ -0,0 +1,37 @@ +#!/bin/bash + +set -e + +case "$1" in + + upgrade) + exit 0 + ;; + + remove|deconfigure) + # Stop and remove service (when needed) + if which deb-systemd-invoke >/dev/null 2>&1 && pidof systemd >/dev/null 2>&1; then + echo "Removing systemd service '{package}' ..." + deb-systemd-invoke stop {package} 2>/dev/null >/dev/null || true + deb-systemd-invoke disable {package} 2>/dev/null >/dev/null || true + rm /lib/systemd/system/{package}.service 2>/dev/null >/dev/null || true + fi + ;; + + failed-upgrade) + exit 0 + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 \ No newline at end of file diff --git a/debian/siridb-server.service b/debian/siridb-server.service new file mode 100644 index 00000000..47a57011 --- /dev/null +++ b/debian/siridb-server.service @@ -0,0 +1,13 @@ +[Unit] +Description=SiriDB Server +After=network.target + +[Service] +ExecStart=/usr/bin/siridb-server --config /etc/siridb/siridb.conf --log-level warning +StandardOutput=journal +LimitNOFILE=65535 +TimeoutStartSec=10 +TimeoutStopSec=300 + +[Install] +WantedBy=multi-user.target diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)